package pms.userLogin.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import pms.common.model.TBL008;
import pms.userLogin.dao.UserLoginDao;

/**
 * 标题：用户登录Service<br>
 * 概述：用户登录Service<br>
 * 生成时间：2013-5-26 下午9:33:18<br>
 * 作者：李威<br>
 */
@Service
public class UserLoginServiceImpl implements UserLoginService{

    @Autowired
    private UserLoginDao userLoginDao;
    
    /**
     * 描述：校验用户
     * @param userId 用户ID
     * @param passWord 用户密码
     * @return TBL008 
     */
    public String checkUser(String userId,String passWord){
        String checkFlag = null;
        TBL008 tBL008 = userLoginDao.findUser(userId);
        if(tBL008 != null){
            String pwd = tBL008.getUserPassword();
            if(!passWord.equals(pwd)){
                checkFlag = "FAILE";
            }
        }
        return checkFlag;
    }
}
